From a2532a6ff194b3ce2265cda5781a9652437cccb5 Mon Sep 17 00:00:00 2001 From: Debian Science Maintainers Date: Sat, 2 Mar 2019 14:59:35 +0000 Subject: [PATCH] Use Debian packaged IPhythonSphinx extensions Last-Update: Wed, 13 Feb 2019 08:43:05 +0100 Also drop matplotlib.sphinxext.only_directives which fail with python3-matplotlib and are not used Gbp-Pq: Name deb_use_internal_ipythonsphinx_extensions --- docs/source/conf.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 969eb7d..91f4c7b 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -36,14 +36,29 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.inheritance_diagram', 'matplotlib.sphinxext.plot_directive', - 'matplotlib.sphinxext.only_directives', - 'IPython.sphinxext.ipython_console_highlighting', - 'IPython.sphinxext.ipython_directive', + #'matplotlib.sphinxext.only_directives', + #'IPython.sphinxext.ipython_console_highlighting', + #'IPython.sphinxext.ipython_directive', 'github', # for GitHub links, 'numpydoc', # numpydoc or napoleon, but not both # 'sphinx.ext.napoleon' ] +try: + import IPython.sphinxext.ipython_console_highlighting as _ + import IPython.sphinxext.ipython_directive as _ + extensions += [ + 'IPython.sphinxext.ipython_console_highlighting', + 'IPython.sphinxext.ipython_directive' + ] +except: + # If systems have older IPython, just use shipped copies + extensions += [ + 'ipython_console_highlighting', + 'ipython_directive' + ] + + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -332,4 +347,4 @@ import numpy as np import scipy.stats as stats import matplotlib.pyplot as plt import pandas as pd -""" \ No newline at end of file +""" -- 2.30.2